package com.lancoo.znbkxx.teacher.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.lancoo.znbkxx.teacher.R
import kotlinx.android.synthetic.main.item_personal_center.view.*

/**
 *@author Admin
 *@date 2021/1/27
 *
 */
class PersonalCenterAdapter(data: List<String>) : BaseQuickAdapter<String, BaseViewHolder>(data) {
    init {
        mLayoutResId = R.layout.item_personal_center
    }

    override fun convert(helper: BaseViewHolder, item: String?) {
        with(helper.itemView) {
            tv.text = item
            when (helper.layoutPosition) {
                0 -> iv.setImageResource(R.mipmap.icon_sysm)
                1 -> iv.setImageResource(R.mipmap.icon_daymode)
                2 -> iv.setImageResource(R.mipmap.icon_setting)
            }
        }
    }
}